Optimal. Leaf size=171 \[ \frac {1}{4} \log \left (-\frac {b (1-x)}{1-b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1+x)}{1+b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1-x)}{1+b}\right ) \log (1+b x)+\frac {1}{4} \log \left (-\frac {b (1+x)}{1-b}\right ) \log (1+b x)+\frac {1}{4} \text {PolyLog}\left (2,\frac {1-b x}{1-b}\right )-\frac {1}{4} \text {PolyLog}\left (2,\frac {1-b x}{1+b}\right )+\frac {1}{4} \text {PolyLog}\left (2,\frac {1+b x}{1-b}\right )-\frac {1}{4} \text {PolyLog}\left (2,\frac {1+b x}{1+b}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 171, normalized size of antiderivative = 1.00, number of steps
used = 17, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {6119, 2456,
2441, 2440, 2438} \begin {gather*} \frac {1}{4} \text {Li}_2\left (\frac {1-b x}{1-b}\right )-\frac {1}{4} \text {Li}_2\left (\frac {1-b x}{b+1}\right )+\frac {1}{4} \text {Li}_2\left (\frac {b x+1}{1-b}\right )-\frac {1}{4} \text {Li}_2\left (\frac {b x+1}{b+1}\right )+\frac {1}{4} \log \left (-\frac {b (1-x)}{1-b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (x+1)}{b+1}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1-x)}{b+1}\right ) \log (b x+1)+\frac {1}{4} \log \left (-\frac {b (x+1)}{1-b}\right ) \log (b x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2438
Rule 2440
Rule 2441
Rule 2456
Rule 6119
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(b x)}{1-x^2} \, dx &=-\left (\frac {1}{2} \int \frac {\log (1-b x)}{1-x^2} \, dx\right )+\frac {1}{2} \int \frac {\log (1+b x)}{1-x^2} \, dx\\ &=-\left (\frac {1}{2} \int \left (\frac {\log (1-b x)}{2 (1-x)}+\frac {\log (1-b x)}{2 (1+x)}\right ) \, dx\right )+\frac {1}{2} \int \left (\frac {\log (1+b x)}{2 (1-x)}+\frac {\log (1+b x)}{2 (1+x)}\right ) \, dx\\ &=-\left (\frac {1}{4} \int \frac {\log (1-b x)}{1-x} \, dx\right )-\frac {1}{4} \int \frac {\log (1-b x)}{1+x} \, dx+\frac {1}{4} \int \frac {\log (1+b x)}{1-x} \, dx+\frac {1}{4} \int \frac {\log (1+b x)}{1+x} \, dx\\ &=\frac {1}{4} \log \left (-\frac {b (1-x)}{1-b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1+x)}{1+b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1-x)}{1+b}\right ) \log (1+b x)+\frac {1}{4} \log \left (-\frac {b (1+x)}{1-b}\right ) \log (1+b x)+\frac {1}{4} b \int \frac {\log \left (-\frac {b (1-x)}{1-b}\right )}{1-b x} \, dx+\frac {1}{4} b \int \frac {\log \left (\frac {b (1-x)}{1+b}\right )}{1+b x} \, dx-\frac {1}{4} b \int \frac {\log \left (-\frac {b (1+x)}{-1-b}\right )}{1-b x} \, dx-\frac {1}{4} b \int \frac {\log \left (\frac {b (1+x)}{-1+b}\right )}{1+b x} \, dx\\ &=\frac {1}{4} \log \left (-\frac {b (1-x)}{1-b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1+x)}{1+b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1-x)}{1+b}\right ) \log (1+b x)+\frac {1}{4} \log \left (-\frac {b (1+x)}{1-b}\right ) \log (1+b x)+\frac {1}{4} \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{-1-b}\right )}{x} \, dx,x,1-b x\right )-\frac {1}{4} \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{1-b}\right )}{x} \, dx,x,1-b x\right )-\frac {1}{4} \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{-1+b}\right )}{x} \, dx,x,1+b x\right )+\frac {1}{4} \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{1+b}\right )}{x} \, dx,x,1+b x\right )\\ &=\frac {1}{4} \log \left (-\frac {b (1-x)}{1-b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1+x)}{1+b}\right ) \log (1-b x)-\frac {1}{4} \log \left (\frac {b (1-x)}{1+b}\right ) \log (1+b x)+\frac {1}{4} \log \left (-\frac {b (1+x)}{1-b}\right ) \log (1+b x)+\frac {1}{4} \text {Li}_2\left (\frac {1-b x}{1-b}\right )-\frac {1}{4} \text {Li}_2\left (\frac {1-b x}{1+b}\right )+\frac {1}{4} \text {Li}_2\left (\frac {1+b x}{1-b}\right )-\frac {1}{4} \text {Li}_2\left (\frac {1+b x}{1+b}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.65, size = 576, normalized size = 3.37 \begin {gather*} -\frac {b \left (2 i \text {ArcCos}\left (\frac {1+b^2}{1-b^2}\right ) \text {ArcTan}\left (\frac {b x}{\sqrt {-b^2}}\right )-4 \text {ArcTan}\left (\frac {\sqrt {-b^2}}{b x}\right ) \tanh ^{-1}(b x)-\left (\text {ArcCos}\left (\frac {1+b^2}{1-b^2}\right )-2 \text {ArcTan}\left (\frac {b x}{\sqrt {-b^2}}\right )\right ) \log \left (\frac {2 b \left (-i+\sqrt {-b^2}\right ) (-1+b x)}{\left (-1+b^2\right ) \left (-i b+\sqrt {-b^2} x\right )}\right )-\left (\text {ArcCos}\left (\frac {1+b^2}{1-b^2}\right )+2 \text {ArcTan}\left (\frac {b x}{\sqrt {-b^2}}\right )\right ) \log \left (\frac {2 b \left (i+\sqrt {-b^2}\right ) (1+b x)}{\left (-1+b^2\right ) \left (-i b+\sqrt {-b^2} x\right )}\right )+\left (\text {ArcCos}\left (\frac {1+b^2}{1-b^2}\right )-2 \left (\text {ArcTan}\left (\frac {\sqrt {-b^2}}{b x}\right )+\text {ArcTan}\left (\frac {b x}{\sqrt {-b^2}}\right )\right )\right ) \log \left (\frac {\sqrt {2} \sqrt {-b^2} e^{-\tanh ^{-1}(b x)}}{\sqrt {-1+b^2} \sqrt {1+b^2+\left (-1+b^2\right ) \cosh \left (2 \tanh ^{-1}(b x)\right )}}\right )+\left (\text {ArcCos}\left (\frac {1+b^2}{1-b^2}\right )+2 \left (\text {ArcTan}\left (\frac {\sqrt {-b^2}}{b x}\right )+\text {ArcTan}\left (\frac {b x}{\sqrt {-b^2}}\right )\right )\right ) \log \left (\frac {\sqrt {2} \sqrt {-b^2} e^{\tanh ^{-1}(b x)}}{\sqrt {-1+b^2} \sqrt {1+b^2+\left (-1+b^2\right ) \cosh \left (2 \tanh ^{-1}(b x)\right )}}\right )+i \left (\text {PolyLog}\left (2,\frac {\left (1+b^2-2 i \sqrt {-b^2}\right ) \left (b-i \sqrt {-b^2} x\right )}{\left (-1+b^2\right ) \left (b+i \sqrt {-b^2} x\right )}\right )-\text {PolyLog}\left (2,\frac {\left (1+b^2+2 i \sqrt {-b^2}\right ) \left (b-i \sqrt {-b^2} x\right )}{\left (-1+b^2\right ) \left (b+i \sqrt {-b^2} x\right )}\right )\right )\right )}{4 \sqrt {-b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 6.54, size = 221, normalized size = 1.29
method | result | size |
risch | \(\frac {\ln \left (-b x +1\right ) \ln \left (\frac {-b x +b}{-1+b}\right )}{4}+\frac {\dilog \left (\frac {-b x +b}{-1+b}\right )}{4}-\frac {\ln \left (-b x +1\right ) \ln \left (\frac {-b x -b}{-b -1}\right )}{4}-\frac {\dilog \left (\frac {-b x -b}{-b -1}\right )}{4}+\frac {\ln \left (b x +1\right ) \ln \left (\frac {b x +b}{-1+b}\right )}{4}+\frac {\dilog \left (\frac {b x +b}{-1+b}\right )}{4}-\frac {\ln \left (b x +1\right ) \ln \left (\frac {b x -b}{-b -1}\right )}{4}-\frac {\dilog \left (\frac {b x -b}{-b -1}\right )}{4}\) | \(160\) |
derivativedivides | \(\frac {-\frac {\arctanh \left (b x \right ) b \ln \left (-b x +b \right )}{2}+\frac {\arctanh \left (b x \right ) b \ln \left (b x +b \right )}{2}-\frac {b^{2} \left (\frac {\dilog \left (\frac {-b x +1}{1-b}\right )}{2 b}+\frac {\ln \left (-b x +b \right ) \ln \left (\frac {-b x +1}{1-b}\right )}{2 b}-\frac {\dilog \left (\frac {-b x -1}{-b -1}\right )}{2 b}-\frac {\ln \left (-b x +b \right ) \ln \left (\frac {-b x -1}{-b -1}\right )}{2 b}-\frac {\dilog \left (\frac {b x -1}{-b -1}\right )}{2 b}-\frac {\ln \left (b x +b \right ) \ln \left (\frac {b x -1}{-b -1}\right )}{2 b}+\frac {\dilog \left (\frac {b x +1}{1-b}\right )}{2 b}+\frac {\ln \left (b x +b \right ) \ln \left (\frac {b x +1}{1-b}\right )}{2 b}\right )}{2}}{b}\) | \(221\) |
default | \(\frac {-\frac {\arctanh \left (b x \right ) b \ln \left (-b x +b \right )}{2}+\frac {\arctanh \left (b x \right ) b \ln \left (b x +b \right )}{2}-\frac {b^{2} \left (\frac {\dilog \left (\frac {-b x +1}{1-b}\right )}{2 b}+\frac {\ln \left (-b x +b \right ) \ln \left (\frac {-b x +1}{1-b}\right )}{2 b}-\frac {\dilog \left (\frac {-b x -1}{-b -1}\right )}{2 b}-\frac {\ln \left (-b x +b \right ) \ln \left (\frac {-b x -1}{-b -1}\right )}{2 b}-\frac {\dilog \left (\frac {b x -1}{-b -1}\right )}{2 b}-\frac {\ln \left (b x +b \right ) \ln \left (\frac {b x -1}{-b -1}\right )}{2 b}+\frac {\dilog \left (\frac {b x +1}{1-b}\right )}{2 b}+\frac {\ln \left (b x +b \right ) \ln \left (\frac {b x +1}{1-b}\right )}{2 b}\right )}{2}}{b}\) | \(221\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 180, normalized size = 1.05 \begin {gather*} \frac {1}{4} \, b {\left (\frac {\log \left (x + 1\right ) \log \left (-\frac {b x + b}{b + 1} + 1\right ) + {\rm Li}_2\left (\frac {b x + b}{b + 1}\right )}{b} + \frac {\log \left (x - 1\right ) \log \left (\frac {b x - b}{b + 1} + 1\right ) + {\rm Li}_2\left (-\frac {b x - b}{b + 1}\right )}{b} - \frac {\log \left (x + 1\right ) \log \left (-\frac {b x + b}{b - 1} + 1\right ) + {\rm Li}_2\left (\frac {b x + b}{b - 1}\right )}{b} - \frac {\log \left (x - 1\right ) \log \left (\frac {b x - b}{b - 1} + 1\right ) + {\rm Li}_2\left (-\frac {b x - b}{b - 1}\right )}{b}\right )} + \frac {1}{2} \, {\left (\log \left (x + 1\right ) - \log \left (x - 1\right )\right )} \operatorname {artanh}\left (b x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {\operatorname {atanh}{\left (b x \right )}}{x^{2} - 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} -\int \frac {\mathrm {atanh}\left (b\,x\right )}{x^2-1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________